/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.fty.service;

import java.util.List;

import com.jeesite.common.lang.DateUtils;
import com.jeesite.modules.fty.entity.FtyLeaseContractSmart;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.fty.entity.FtyLeaseContractFull;
import com.jeesite.modules.fty.dao.FtyLeaseContractFullDao;

/**
 * 合同表Service
 * @author chensk
 * @version 2018-04-24
 */
@Service
@Transactional(readOnly=true)
public class FtyLeaseContractFullService extends CrudService<FtyLeaseContractFullDao, FtyLeaseContractFull> {


	public void addDataScopeFilter(FtyLeaseContractFull ftyLeaseContractFull, String ctrlPermi) {
//		ftySelContract.getSqlMap().getDataScope().addFilter("dsfOffice",
//				"Office", "e.office_code",ctrlPermi);
		ftyLeaseContractFull.getSqlMap().getDataScope().addFilter("dsfOffice", "Office", "e.office_code", ctrlPermi);
		// 举例1：公司数据权限过滤，实体类@Table注解extWhereKeys="dsf"
	}

//	public void addDataScopeFilter(T entity) {
//		office.getSqlMap().getDataScope().addFilter("dsf", "Office", "a.office_code");
//	}
	/**
	 * 获取单条数据
	 * @param ftyLeaseContractFull
	 * @return
	 */
	@Override
	public FtyLeaseContractFull get(FtyLeaseContractFull ftyLeaseContractFull) {
		return super.get(ftyLeaseContractFull);
	}
	
	/**
	 * 查询分页数据
	 * @param page 分页对象
	 * @param ftyLeaseContractFull
	 * @return
	 */
	@Override
	public Page<FtyLeaseContractFull> findPage(Page<FtyLeaseContractFull> page, FtyLeaseContractFull ftyLeaseContractFull) {
		return super.findPage(page, ftyLeaseContractFull);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param ftyLeaseContractFull
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(FtyLeaseContractFull ftyLeaseContractFull) {
		super.save(ftyLeaseContractFull);
	}
	
	/**
	 * 更新状态
	 * @param ftyLeaseContractFull
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(FtyLeaseContractFull ftyLeaseContractFull) {
		super.updateStatus(ftyLeaseContractFull);
	}
	
	/**
	 * 删除数据
	 * @param ftyLeaseContractFull
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(FtyLeaseContractFull ftyLeaseContractFull) {
		super.delete(ftyLeaseContractFull);
	}

	@Transactional(readOnly=false)
	public void generalUUid(FtyLeaseContractFull ftyLeaseContractFull) {




		dao.generalcn(ftyLeaseContractFull);
	}
}